package flex.cc.uac.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import flex.cc.base.dto.LoginAuthDto;
import flex.cc.uac.dto.role.RoleBindActionDto;
import flex.cc.uac.dto.role.RoleBindMenuDto;
import flex.cc.uac.dto.role.RoleBindUserDto;
import flex.cc.uac.entity.UacRoleEntity;
import flex.cc.uac.vo.BindAuthVo;

import java.util.List;

/**
 * 角色表
 *
 * @author zhangzk
 * @email zhangzhikai@sinosoft.com.cn
 * @date 2020-06-03 18:23:45
 */
public interface UacRoleService extends IService<UacRoleEntity> {

    /**
     * 分页查询角色信息
     * @param role
     * @return
     */
    IPage<UacRoleEntity> queryRoleListWithPage(UacRoleEntity role);


    /**
     * 根据id删除角色
     * @param id
     * @return
     */
    boolean deleteRoleById(Long id);

    /**
     * 批量删除角色
     * @param deleteIdList
     */
    void batchDeleteByIdList(List<Long> deleteIdList);

    /**
     * 保存角色
     */
    void saveRole(UacRoleEntity role, LoginAuthDto loginAuthDto);
    BindAuthVo getActionTreeByRoleId(Long roleId,String isEdit);
    BindAuthVo getMenuTreeByRoleId(Long roleId,String isEdit);
    /**
     * 绑定/解绑角色-用户
     * @param roleBindUserDto
     * @param loginAuthDto
     */
    void bindUserRole(RoleBindUserDto roleBindUserDto, LoginAuthDto loginAuthDto);
    void bindMenu(RoleBindMenuDto roleBindMenuDto);
    void bindAction(RoleBindActionDto roleBindActionDto);
}

